package cn.usain.mapper;

import com.jiyun.common.pojo.product.ProductCollection;
import com.jiyun.common.vo.R;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductCollectionMapper {
    @Insert("INSERT INTO special (user_id, product_id) VALUES (#{userId}, #{productId})")
    int insertProductCollection(Integer userId, Integer productId);

    @Select("select * from product_collection where user_id = #{userId}")
    R<List<ProductCollection>> findCollectList(Integer userId);

}
